using ShoppingEntity;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IShoppingBll
{
    public interface ICommodityInfoBll : IBaseDeleteBll<CommodityInfo>
    {
        /// <summary>
        /// 商品页面展示
        /// </summary>
        /// <param name="page"></param>
        /// <param name="limit"></param>
        /// <param name="count"></param>
        /// <param name="CommodityName"></param>
        /// <param name="CategoryId"></param>
        /// <returns></returns>
        object GetCommodityInfoListByPage(int page, int limit, out int count, string CommodityName, string CategoryId);


        /// <summary>
        /// 添加获取商品名字
        /// </summary>
        /// <returns></returns>
        object GetCommodityRecordSelectOption();


        /// <summary>
        /// 通过ID获取商品与分类
        /// </summary>
        /// <param name="commodityId"></param>
        /// <returns></returns>
        object GetShoppingCartOption(string commodityId);



        /// <summary>
        /// 上传商品图片
        /// </summary>
        /// <param name="stream"></param>
        /// <param name="extensionName"></param>
        /// <param name="length"></param>
        /// <param name="iD"></param>
        /// <param name="fileName"></param>
        /// <returns></returns>
        bool Upload(Stream stream, string extensionName, long length, string iD, string fileName);
         

        /// <summary>
        /// 直接购买
        /// </summary>
        /// <param name="commodityId"></param>
        /// <param name="num"></param>
        /// <param name="iD"></param>
        /// <returns></returns>
        bool PlayCommodityOrder(string commodityId, int num, UserInfo userInfo,out string msg);
    }
}
